package org.nepu.slr;

import cn.hutool.core.lang.Validator;
import cn.hutool.json.JSONUtil;
import lombok.Data;
import org.nepu.slr.井架底座绞车功能试验.C3TestParams;
import org.nepu.slr.井架底座绞车现场检查.C2InspectParams;
import org.nepu.slr.井架底座绞车结构强度.C5StrengthParams;
import org.nepu.slr.井架底座绞车资料.C1DataParams;
import org.nepu.slr.井架承载能力检测.C4DetectionParams;

@Data
public class LongevityParams {

    C1DataParams c1;

    C2InspectParams c2;

    C3TestParams c3;

    C4DetectionParams c4;

    C5StrengthParams c5;

    public LongevityParams jsonBuild(String jsonStr){
        if (Validator.isEmpty(jsonStr)){
            return new LongevityParams();
        }
        return JSONUtil.toBean(jsonStr, LongevityParams.class);
    }
}
